package org.example.multiThreading.communication;

public class testBankCard {
    public static void main(String[] args) {
        BandCard card = new BandCard();

        AddMoney addMoney = new AddMoney(card);
        AddMoney addMoney2 = new AddMoney(card);
        SubMoney money = new SubMoney(card);
        SubMoney money2 = new SubMoney(card);

        Thread thread = new Thread(addMoney);
        Thread thread1 = new Thread(money);
        Thread thread2 = new Thread(money2);
        Thread thread3 = new Thread(addMoney2);
        thread1.start();
        thread2.start();
        thread.start();
        thread3.start();
    }
}
